import { Suspense } from "react";
import GlobalLoading from '../../components/GlobalLoading/GlobalLoading'

/**
 * @description 路由懒加载
 * @param {Element} Comp 需要访问的组件
 * @returns element
 */

const lazyLoad = (Comp) => {
  return (
    <Suspense
			fallback={
				<GlobalLoading/>
			}
		>
			<Comp />
		</Suspense>
  )
}

export default lazyLoad